package com.ufgov.ip.sysmanager.dao.imp;

import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.ufgov.ip.sysmanager.entity.IpCompany;
@Repository
public class ICompanyDaoImpl {

	@Autowired
	private JdbcTemplate jdbcTemplate;

	public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}

	public void saveCompany(IpCompany ipCompany) {

		String sql = "insert into ip_company(CO_ID,HIRER_ID,CO_CODE,CO_FULLNAME) values (?,?,?,?)";
		Object[] args = { ipCompany.getCoId(),
				ipCompany.getHirerId(), ipCompany.getCoCode(),
				ipCompany.getCoFullname() };
		jdbcTemplate.update(sql, args);

	}
}
